$(document).ready(function () {
    $("[name='log']").click(function () {
    //    获取username，password
    //    异步请求
        var username=$("[class='name_input']").val();
        var password=$("[class='pass_input']").val();
        $.get("pc/sysUserAction/login",{"username":username,"password":password},function (rs){
            var pcs=rs.result;
            if (pcs[0]==null){
                alert("账号或者密码错误!");
            }else {
                sessionStorage.setItem("user", JSON.stringify(pcs[0]));
                window.location.href ="../list.html";
            }
        });
    });
    $("[class='regiser']").click(function (){
            window.location.href ="../register.html";
    }
    )
});